import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
const Login = () => import('../views/Login.vue')
const Register = () => import('../views/Register.vue')
const Shop = () => import('../views/secondlevelPage/shop.vue')
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    component: Home,
    children: [
      {
        path: '/',
        component: () => import('../views/menu/home.vue')
      },
      {
        path: '/home',
        name: 'home',
        component: () => import('../views/menu/home.vue')
      },
      {
        path: '/classification',
        name: 'classification',
        component: () => import('../views/menu/classification.vue')
      },
      {
        path: '/management',
        name: 'management',
        component: () => import('../views/menu/management.vue')
      },
      {
        path: '/mine',
        name: 'mine',
        component: () => import('../views/menu/mine.vue')
      }
    ]
  },
  {
    path: '/commodityDetails',
    name: 'commodityDetails',
    component: () => import('../views/secondlevelPage/commodityDetails.vue')
  },
  {
    path: '/login',
    name: 'Login',
    component: Login
  },
  {
    path: '/register',
    name: 'Register',
    component: Register
  },
  {
    path: '/shop',
    name: 'shop',
    component: Shop
  },
  {
    path: '/course',
    name: 'course',
    component: () => import('../views/secondlevelPage/course.vue')
  },
  {
    path: '/pay',
    name: 'pay',
    component: () => import('../views/secondlevelPage/pay.vue')
  },
  {
    path: '/cardPayment',
    name: 'cardPayment',
    component: () => import('../views/secondlevelPage/cardPayment.vue')
  },
  {
    path: '/homeTodetails',
    name: 'homeTodetails',
    component: () => import('../views/homeTodetails/details.vue')
  },
  {
    path: '/a',
    name: 'a',
    component: () => import('../components/Carousel.vue')
  },
  {
    path: '/retrieve_password',
    name: 'retrieve_password',
    component: () => import('../views/retrieve_password.vue')
  },
  {
    path: '/addr',
    name: 'addr',
    component: () => import('../components/addr.vue')
  },
  {
    path: '/userInfo',
    name: 'userInfo',
    component: () => import('../views/secondlevelPage/userInfo.vue')
  },
  {
    path: '/buildPayPassword',
    name: 'buildPayPassword',
    component: () => import('../views/secondlevelPage/buildPayPassword.vue')
  },
  {
    path: '/modifyLoginPsd',
    name: 'modifyLoginPsd',
    component: () => import('../views/secondlevelPage/modifyLoginPsd.vue')
  },
  {
    path: "/genealogy",
    name: "genealogy",
    component: () => import('../views/space/Genealogy.vue')
  },
  {
    path: '/businessSetting',
    name: 'businessSetting',
    component: () => import('../views/businessManagement/businessInfo/settings/setting.vue')
  },
  {
    path: '/changeBusinessName',
    name: 'changeBusinessName',
    component: () => import('../views/businessManagement/businessInfo/changeName.vue')
  },
  {
    path: '/changeBusinessPhone',
    name: 'changeBusinessPhone',
    component: () => import('../views/businessManagement/businessInfo/changePhone.vue')
  },
  {
    path: '/changeBusinessAvator',
    name: 'changeBusinessAvator',
    component: () => import('../views/businessManagement/businessInfo/changeAvator.vue')
  },
  {
    path: '/changeIntroduction',
    name: 'changeIntroduction',
    component: () => import('../views/businessManagement/businessInfo/changeIntroduction.vue')
  },
  {
    path: '/commodity',
    name: 'commodity',
    component: () => import('../views/businessManagement/commodityManagement/commodity.vue')
  },
  {
    path: '/orderManage',
    name: 'orderManage',
    component: () => import('../views/businessManagement/orderManagement/orderManage.vue')
  },
  {
    path: '/postProductInfo',
    name: 'postProductInfo',
    component: () => import('../views/businessManagement/commodityManagement/postProductInfo.vue')
  },
  {
    path: '/businessDetails',
    name: 'businessDetails',
    component: () => import('../views/homeTodetails/businessDetails.vue')
  },
  {
    path: '/settledinStores',
    component: () => import('../components/settleinStatus/settledinStores.vue')
  },
  {
    path: '/bankCard',
    name: 'bankCard',
    component: () => import('../views/secondlevelPage/bankCard.vue')
  },
  {
    path: '/Recommend',
    name: 'Recommend',
    component: () => import('../views/Recommend.vue')
  },
  {
    path: '/agreement',
    name: 'agreement',
    component: () => import('../views/secondlevelPage/agreement.vue')
  },
  {
    path: '/changeUserName',
    name: 'changeUserName',
    component: () => import('../views/secondlevelPage/changeUserName.vue')
  },
  {
    path: '/verified',
    name: 'verified',
    component: () => import('../views/secondlevelPage/verified.vue')
  },
  {
    path: '/orderListpage',
    name: 'orderListpage',
    component: () => import('../views/menu/order/orderListpage.vue')
  },
  {
    path: '/canversationMain',
    name: 'canversationMain',
    component: () => import('../views/secondlevelPage/canversationMain.vue')
  },
  {
    path: '/resourceSharing',
    name: 'resourceSharing',
    component: () => import('../views/businessManagement/resourceSharing/resourceSharing.vue')
  },
  {
    path: '/portfolio',
    name: 'portfolio',
    component: () => import('../views/businessManagement/resourceSharing/childPage/portfolio.vue')
  },
  {
    path: '/judgeRe',
    name: 'judgeRe',
    component: () => import('../views/businessManagement/resourceSharing/childPage/judgeRe.vue')
  },
  {
    path: '/playerRe',
    name: 'playerRe',
    component: () => import('../views/businessManagement/resourceSharing/childPage/playerRe.vue')
  },
  {
    path: '/franchisee',
    name: 'franchisee',
    component: () => import('../views/businessManagement/resourceSharing/childPage/franchisee.vue')
  },
  {
    path: '/divisionAnnouncement',
    name: 'divisionAnnouncement',
    component: () => import('../views/businessManagement/resourceSharing/childPage/divisionAnnouncement.vue')
  },
  {
    path: '/aboutUs',
    name: 'aboutUs',
    component: () => import('../views/businessManagement/resourceSharing/childPage/aboutUs.vue')
  }
]

const router = new VueRouter({
  base: process.env.BASE_URL,
  routes
})

export default router
